﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using FinPlusWPFControls;
using System.Diagnostics;
using FinPlusCommon;

namespace FinPlusViewshell
{
    public partial class App : Application, IFinPlusComp
    {
        public string Id { get; set; }
        public string[] States { get { return new string[] { "Height", "Width", "Left", "Top" }; } }
        public string[] TestStates { get { return new string[] { "TestString" }; } }
        public IFunctions Adaptor { get { return _finPlusWindow.Adaptor; } }
        public bool IsValid { get; set; }
        public string TestString { get { return null; } }
        public string ContainerId { get; set; }

        private FinPlusWindow _finPlusWindow;

        private void ApplicationStartup(object s, StartupEventArgs a)
        {
            _finPlusWindow = new FinPlusWindow();
            _finPlusWindow.LoadView(a.Args[0], a.Args[1], a.Args[2], false, a.Args[3]);
        }

        public void Dock(object component, string dock)
        {
            IsValid = false;
            throw new NotImplementedException();
        }

        public void CmdExecute(IFunction command)
        {
            IsValid = false;
            throw new NotImplementedException();
        }

        public void Dispose()
        {
            if (_finPlusWindow != null)
                _finPlusWindow.Dispose();
        }
    }
}
